package it.low.game.server;

import it.low.game.server.util.ServerLogManager;

public class Server {
	
	private static ServerEngine serverEngine = null;
	public static boolean running = false;
		
	public static void main(String[] args) {
		try{	
			ServerLogManager.logMsg("Launching server ...");		
			initServer();		
			startServer();		
		}catch(Exception e){
			e.printStackTrace();
		}

	}
	
	private static void initServer(){
		ServerLogManager.logMsg("Initializing server ... ");
	}
	
	public static void startServer(){
		ServerLogManager.logMsg("Starting server ... ");
		initEngine();
		startEngine();
	}
	
	private static void initEngine(){
		ServerLogManager.logMsg("Initializing engine ... ");
		serverEngine = new ServerEngine();
		serverEngine.init();		
	}
	
	private static void startEngine(){
		ServerLogManager.logMsg("Starting engine ... ");
		serverEngine.start();
		running = true;
	}
	

}
